package java67_adv6;

import java.io.*;

public class FileTest2 {

	public static void main(String[] args) {
		File f = new File("d:/logs", "log.log");
		try {
			FileInputStream fin = new FileInputStream(f);
			System.out.println("大小:" + fin.available() + "字节");
			int ch;
			fin.skip(8);
			ch = fin.read();// 读完自动读下一个
			System.out.println(ch + " " + (char) ch);
			ch = fin.read();
			System.out.println(ch + " " + (char) ch);
			fin.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

//		System.out.println(f.length());
//
//		// 当前目录:相对路径
//		File f2 = new File("src/java67_adv6/FileTest2.java");
//		System.out.println(f2.getAbsolutePath());
	}

}
